package thread.threaddemo;

import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;


/**
 * @Author: wenjingyuan
 * @Date: 2022/11/19/20:46
 * @Description:Lock基础用法：
 */
public class ThreadLock {
    public static void main(String[] args) {
        Lock lock=new ReentrantLock();
        lock.lock();
        try{
            System.out.println("你好，ReentrantLock");
        }finally {
            lock.unlock();
        }


    }
}
